Recording Method, Recording Play Method, Apparatuses, and Terminals

ABSTRACT

A recording play method, terminal and non-transitory computer-readable storage medium are provided, where the recording play method includes obtaining a recording file, wherein the recording file comprises saved recording data in all sound source directions via the at least three microphones; receiving a first gesture on an interface displayed on the screen, wherein the first gesture indicates a first recording play direction; determining, according to the first gesture, a first recording data matching the first recording play direction from the saved recording data in all sound source directions; and playing the first recording data matching the first recording play direction.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/778,986, filed on May 24, 2018, which is a U.S. National Stage ofInternational Patent Application No. PCT/CN2016/104364, filed on Nov. 2,2016, which claims priority to Chinese Patent Application No.201510831351.1, filed on Nov. 25, 2015. All of the aforementioned patentapplications are hereby incorporated by reference in their entireties.

TECHNICAL FIELD

The present disclosure relates to the audio processing field, and inparticular, to a recording method, a recording play method, apparatuses,and terminals.

BACKGROUND

With rapid development of communications technologies, functions of amobile terminal become increasingly powerful, and a range and anenvironment of use become increasingly diverse. For example, multiplemicrophones may be pre-installed in a mobile terminal such as asmartphone, and recording and playing are performed according to auser's requirement using a sound source positioning technology and adirectional play technology.

Currently, in a mobile terminal recording process, a recording functionin a specified direction may be implemented by specifying a sound sourcedirection and directionally processing and saving a sound obtained bycombining sounds input by multiple microphones. When recording obtainedsound using a directional recording solution is played, a savedrecording file in a specified direction is played such that playingrecording in a specified direction is implemented.

In the foregoing implementation solution for implementing directionalrecording and directional recording play, only functions of recordingand recording play in a pre-specified direction can be implemented. Whenrecording is played, an adjustment cannot be made in real time accordingto the user's requirement, and flexibility is poor.

SUMMARY

Embodiments of the present disclosure provide a recording method, arecording play method, apparatuses, and terminals to implement adirection-adjustable recording play function.

According to a first aspect, a recording method is provided. Accordingto the method, a recording apparatus obtains recording data that is inall sound source directions and that is of multiple audio inputs, wherethe multiple audio inputs may be input by a microphone array, and themicrophone array includes at least three microphones in order toposition and obtain 360 degrees (°) sound source directions. Therecording apparatus generates a recording file according to the obtainedrecording data, and saves, in the recording file, the recording data inall the sound source directions input by the at least three microphonessuch that the complete recording data is retained. When recording isplayed subsequently, recording data in a corresponding sound sourcedirection can be played according to the sound source direction that isset by a user. The sound source direction of the played recording datais different when the direction that is set by the user is differentsuch that a recording play direction can be adjusted.

In a possible design, in this embodiment of the present disclosure, arecording direction that is set by the user may be further obtained. Therecording file saves the recording direction such that playing isperformed according to the saved recording direction in a recording playprocess. The recording direction is one of at least two sound sourcedirections obtained by the microphone array at a same time point, andthe at least two sound source directions are some of all the soundsource directions obtained by the at least three microphones. Therecording direction may be understood as a sound source direction thatneeds to be emphatically recorded and that is set by the user when thereis more than one sound source direction at a same time point, and thereis at least one sound source direction that needs to be emphaticallyrecorded and that is set by the user.

Optionally, the recording direction that is set by the user isdetermined according to a sound source adjustment gesture input by theuser, and the sound source adjustment gesture is used to adjust therecording direction.

Optionally, the recording direction that is set by the user includes atleast two different recording directions that are separately set by theuser at different time in order to implement a recording method in whicha recording direction is adjustable.

According to a second aspect, a recording play method is provided.According to the method, a recording play apparatus obtains a recordingfile and determines a recording play direction. The recording file savesrecording data in all sound source directions input by at least threemicrophones. It may be understood that in the present disclosure, therecording play direction should be at least one of all the sound sourcedirections such that the recording data saved in the recording file canbe played. The recording play apparatus determines, in the recordingfile according to the determined recording play direction, recordingdata that matches the recording play direction, and plays the determinedrecording data in order to implement directional recording play.

It may be understood that the determined recording play direction may beany one or more of all the sound source directions. Therefore, accordingto the recording play method provided in this embodiment of the presentdisclosure, a recording play function in which a sound source directionis adjustable can be implemented.

In a possible design, the recording file saves a recording direction,and the recording play direction may be the recording direction or maybe a specified play direction that is set by a user. If the user setsthe specified play direction, the recording play direction is thespecified play direction, or if the user does not set the specified playdirection, the recording play direction is the recording direction.

Optionally, the specified play direction is determined according to aplay direction adjustment gesture input by the user, and the playdirection adjustment gesture is used to adjust the recording playdirection.

In another possible design, the recording play direction includes afirst recording play direction and a second recording play direction,and the first recording play direction and the second recording playdirection are different recording play directions that are set by theuser at different time points. The playing the determined recording dataincludes playing first recording data, where the first recording data isrecording data that is determined in the recording file and that matchesthe first recording play direction, obtaining the play directionadjustment gesture input by the user, where the play directionadjustment gesture is used to adjust the recording play direction, andswitching, according to the play direction adjustment gesture, fromplaying the first recording data to playing second recording data, wherethe second recording data is recording data that is determined in therecording file and that matches the second recording play direction.Using this design, a recording play function in which a recording playdirection can be switched and adjusted can be implemented.

According to a third aspect, a recording apparatus is provided, wherethe recording apparatus includes an obtaining unit and a processingunit. The obtaining unit is configured to obtain recording data in allsound source directions input by at least three microphones. Theprocessing unit is configured to generate a recording file according tothe recording data obtained by the obtaining unit, where the recordingfile saves the recording data in all the sound source directions inputby the at least three microphones. All the recording data in all thesound source directions input by the at least three microphones is savedin the recording file such that the complete recording data is retained.When recording is played subsequently, recording data in a correspondingsound source direction can be played according to the sound sourcedirection that is set by a user. The sound source direction of theplayed recording data is different when the direction that is set by theuser is different such that a recording play direction can be adjusted.

In a possible design, the obtaining unit is further configured to obtaina recording direction that is set by the user, where the recordingdirection is one of at least two sound source directions, and the atleast two sound source directions are obtained by the at least threemicrophones at a same time point.

The processing unit is further configured to save, in the recordingfile, the recording direction obtained by the obtaining unit such thatplaying is performed according to the saved recording direction in arecording play process.

Optionally, the recording direction that is set by the user and that isobtained by the obtaining unit is determined according to a sound sourceadjustment gesture input by the user, and the sound source adjustmentgesture is used to adjust the recording direction.

Optionally, the recording direction that is set by the user and that isobtained by the obtaining unit includes at least two different recordingdirections that are separately set by the user at different time suchthat the recording apparatus can adjust the recording direction.

According to a fourth aspect, a recording play apparatus is provided,including an obtaining unit, a processing unit, and a play unit. Theobtaining unit is configured to obtain a recording file and determine arecording play direction, where the recording file saves recording datain all sound source directions input by at least three microphones, andthe recording play direction is at least one of all the sound sourcedirections.

The processing unit is configured to determine, in the recording fileobtained by the obtaining unit and according to the recording playdirection determined by the obtaining unit, recording data that matchesthe recording play direction.

The play unit is configured to play the recording data determined by theprocessing unit.

The recording play apparatus provided in this embodiment of the presentdisclosure can implement directional recording play. It may beunderstood that the recording play direction determined by the recordingplay apparatus may be any one or more of all the sound sourcedirections. Therefore, the recording play apparatus provided in thisembodiment of the present disclosure can implement a recording playfunction in which a sound source direction is adjustable.

Optionally, the recording file obtained by the obtaining unit saves arecording direction, the recording direction is one of at least twosound source directions, and the at least two sound source directionsare obtained by the at least three microphones at a same time point.

The obtaining unit determines the recording play direction in thefollowing manner, including determining that the recording playdirection is the specified play direction if a user sets a specifiedplay direction, or determining that the recording play direction is therecording direction if a user does not set a specified play direction.

Optionally, the specified play direction is determined according to aplay direction adjustment gesture input by the user, and the playdirection adjustment gesture is used to adjust the recording playdirection.

In another possible design, the recording play direction obtained by theobtaining unit includes a first recording play direction and a secondrecording play direction, and the first recording play direction and thesecond recording play direction are different recording play directionsthat are set by the user at different time points.

The processing unit is configured to determine, in the recording file,recording data that matches the first recording play direction andrecording data that matches the second recording play direction.

The obtaining unit is configured to obtain the play direction adjustmentgesture input by the user, where the play direction adjustment gestureis used to adjust the recording play direction.

The play unit plays the determined recording data in the followingmanner, including playing first recording data, where the firstrecording data is the recording data that is determined by theprocessing unit in the recording file and that matches the firstrecording play direction, and switching, according to the play directionadjustment gesture obtained by the obtaining unit, from playing thefirst recording data to playing second recording data, where the secondrecording data is the recording data that is determined by theprocessing unit in the recording file and that matches the secondrecording play direction. Using this design, a recording play functionin which a recording play direction can be switched and adjusted can beimplemented.

According to a fifth aspect, a terminal is provided, where the terminalincludes at least three microphones, a processor, a memory, and a bus,and the at least three microphones and the memory are all connected tothe processor using the bus. The memory stores program code executed bythe processor, the program code is a computer readable program, and theprocessor runs the program code in the memory to implement the recordingmethod in the first aspect.

According to a sixth aspect, a terminal is provided, including a player,a processor, a memory, and a bus, where both the player and the memoryare connected to the processor using the bus. The memory stores programcode executed by the processor, the program code is a computer readableprogram, and the processor runs the program code in the memory toimplement the recording play method in the second aspect.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 shows a system architecture to which a recording method and arecording play method are applicable according to an embodiment of thepresent disclosure;

FIG. 2 is an implementation flowchart of a recording method according toan embodiment of the present disclosure;

FIG. 3 is another implementation flowchart of a recording methodaccording to an embodiment of the present disclosure;

FIG. 4 is an implementation flowchart of a recording play methodaccording to an embodiment of the present disclosure;

FIG. 5 is an implementation flowchart of determining a recording playdirection according to an embodiment of the present disclosure;

FIG. 6 is a schematic diagram of composition of a recording apparatusaccording to an embodiment of the present disclosure;

FIG. 7A and FIG. 7B are schematic diagrams of composition of a terminalaccording to an embodiment of the present disclosure;

FIG. 8 is a schematic diagram of composition of a recording playapparatus according to an embodiment of the present disclosure; and

FIG. 9A and FIG. 9B are schematic diagrams of composition of a terminalaccording to an embodiment of the present disclosure.

DESCRIPTION OF EMBODIMENTS

The following clearly describes the technical solutions in theembodiments of the present disclosure with reference to the accompanyingdrawings in the embodiments of the present disclosure.

A recording method and a recording play method provided in theembodiments of the present disclosure may be applied to a systemarchitecture shown in FIG. 1. As shown in FIG. 1, the systemarchitecture for implementing recording and recording play mainlyincludes a microphone array used for sound collection and recording, acodec that supports video and audio compression and decompression, ahigh-fidelity (HiFi) module that enables a playback sound to be highlysimilar to an original sound, a hardware abstraction layer (HAL) thatperforms an algorithm operation, a kernel framework layer (Framework)that provides a standard interface conversion function and controlssound recording and recording play, and an application (designated asAPP) that performs sound recording and recording play operations.

During technical implementation of the embodiments of the presentdisclosure, a sound source positioning technology and a directional playtechnology are used. Accordingly, three microphones are used as anexample in the embodiments of the present disclosure, and briefdescriptions are as follows.

Sound source positioning technology: It takes time to transmit a soundin the air, a combination of the three microphones is used to calculatedifferences between time at which a sound reaches the three microphonesand a relative location of the microphone combination such that anazimuth of a sound source relative to a plane on which the microphonesare located can be learned, and positioning of a sound source directionis implemented.

Directional play technology: Recording is performed using a combinationof the three microphones, and each microphone may record an audio, threeaudio inputs may be combined to reduce noise, a sound in a specifieddirection is picked, and a sound in another direction is suppressed inorder to improve a signal-to-noise ratio of the sound in the specifieddirection such that the sound in the specified direction can behighlighted, and a directional play function is implemented.

In the embodiments of the present disclosure, the microphone array mayinclude at least three microphones. Multiple sounds may be recordedusing combinations of different microphones. For ease of description, aprocessing process of sound recording is referred to as recording in thefollowing in the embodiments of the present disclosure. In FIG. 1, aprocess in which the microphone array collects a sound and transmits thesound upward, and finally generates a recording file may be understoodas a recording process. As shown in FIG. 1, an example in which threemicrophones perform recording is used for description. In a recordingprocess, the microphone array inputs three audio inputs, and the threeaudio inputs include recording data in all sound source directionsdetermined using the sound source positioning technology. In theembodiments of the present disclosure, the recording data may beunderstood as pulse code modulation (PCM) data, or may be understood asa PCM bitstream. The recording data in all the sound source directionsis transmitted to the framework. The framework uses a specified functionscheduling mechanism to combine, into a data stream, the recording datain all the sound source directions input by the microphones, and adds afile header in order to generate a recording file of a specified format.The recording file saves the recording data in all the sound sourcedirections, that is, the recording file includes more than one piece ofrecording data, and each piece of recording data has a sound sourcedirection that matches the recording data. In the embodiments of thepresent disclosure, the recording file may be understood as, forexample, a WAV file. The WAV file includes the recording data in all thesound source directions, and a format of the file is identified as a WAVfile using the file header. In FIG. 1, a process in which the recordingfile is processed by the framework and the HAL using an algorithm and isfinally output using a speaker may be understood as a recording playprocess. In the embodiments of the present disclosure, if a user needsto play the recording file, the framework removes the file header of therecording file to obtain the recording data. The HAL obtains, withreference to a specified recording play direction and from all therecording data that is in all the sound source directions and that isrecorded by the microphones, recording data in the recording playdirection by means of matching, and plays the recording data in thespecified recording play direction using the directional play technologyand corresponding algorithm processing. The recording data in thespecified recording play direction may be played in the followingmanner. Processing the matched recording data in the recording playdirection as a stereophonic file that supports binaural playing withboth an audio-left channel and an audio-right channel (a process ofchanging three arrows into two arrows shown in FIG. 1), and finallyplaying, using the speaker and in a form of one audio, the stereophonicfile that supports both audio-left channel playing and audio-rightchannel playing (a process of changing two arrows into one arrow shownin FIG. 1).

The recording method and the recording play method provided in theembodiments of the present disclosure may be applied to a mobileterminal. A recording apparatus for implementing a recording functionand a recording play apparatus for implementing a recording playfunction may be used as a part of the mobile terminal or may existindependently. It may be understood that the mobile terminal in theembodiments of the present disclosure may be a terminal that hasrecording and recording play functions, such as a smartphone.

The recording method in the embodiments of the present disclosure isdescribed in detail below.

In an embodiment of the present disclosure, refer to FIG. 2 for animplementation flowchart of a method for recording by a recordingapparatus. As shown in FIG. 2, the method includes the following steps.

Step S101. Obtain recording data in all sound source directions.

Further, in this embodiment of the present disclosure, the recordingapparatus may collect sounds in all the sound source directions using amicrophone array. The microphone array includes at least threemicrophones, and sound source directions in 360° azimuths relative to aplane on which the microphones are located may be collected using the atleast three microphones. Therefore, if all the 360° azimuths relative tothe plane on which the microphones are located have sound sources thatmake sounds, all the sound source directions may be understood as allsound source directions that make sounds and that are in the 360°azimuths relative to the plane on which the microphones are located.

Step S102. Generate a recording file, where the recording file saves therecording data in all the sound source directions.

In this embodiment of the present disclosure, the recording apparatusmay save, as the recording file in a storage location corresponding toan application for implementing a recording function, all the recordingdata that is in all the sound source directions and that is collected bythe microphone array, that is, generate the recording file that canimplement a recording play function.

In this embodiment of the present disclosure, the recording apparatussaves all the recording data in all the sound source directions in therecording file such that the complete recording data is retained. Whenrecording is played subsequently, sounds in all the sound sourcedirections can be played, and a recording play direction can be adjustedaccording to a direction that is set by a user.

In a process in which the user uses the recording apparatus to performrecording, it is inevitable that sounds in multiple sound sourcedirections exist at a same time point, but the user may focus on only aspecific sound source direction. For example, in a conference process,discussion is heated in the conference, but the user focuses on a speechof only a key role. Optionally, in this embodiment of the presentdisclosure, the user may set a sound source direction in which a soundthat needs to be recorded is located, and set the specified sound sourcedirection in which the sound that needs to be recorded is located as arecording direction. The recording apparatus obtains the recordingdirection that is set by the user and saves the recording direction inthe recording file such that when the recording file is played, playingcan be performed according to the specified recording direction.

Refer to FIG. 3 for an implementation process in which a recordingapparatus performs recording and saves a recording direction in arecording file. FIG. 3 shows another implementation flowchart ofrecording by the recording apparatus according to an embodiment of thepresent disclosure. As shown in FIG. 3, the method includes thefollowing steps.

Step S201 a. Obtain recording data in all sound source directions inputby at least three microphones.

Step S201 b. Obtain a recording direction that is set by a user.

In this embodiment of the present disclosure, the recording direction isone of at least two sound source directions, and the at least two soundsource directions are obtained by the at least three microphones at asame time point. In other words, in this embodiment of the presentdisclosure, on the basis of recording the recording data in all thesound source directions, the recording apparatus may emphaticallyrecord, according to the recording direction that is set by the user,recording data corresponding to the specified recording direction.

Step S202. Save, in a recording file, all the recording data in all thesound source directions and the recording direction that is set by theuser.

It should be noted that a recording process and sound source positioningare two different implementation processes. Therefore, in thisembodiment of the present disclosure, an execution sequence of obtainingthe recording direction that is set by the user and performing the stepsof the recording process shown in FIG. 1 is not limited, and step S201 aand step S201 b in FIG. 3 are not performed in a sequence.

It should be understood that in this embodiment of the presentdisclosure, the recording data in all the sound source directions inputby the at least three microphones is a set formed by recording data insound source directions obtained by the at least three microphones atdifferent time points, and there may be more than one sound sourcedirection obtained by the at least three microphones at a same timepoint. In this embodiment of the present disclosure, the embodimentcorresponding to the method shown in FIG. 3 is described using anexample in which the at least three microphones obtain at least twosound source directions at a same time point.

Further, in this embodiment of the present disclosure, the recordingdirection that is set by the user is determined according to a soundsource adjustment gesture input by the user, and the sound sourceadjustment gesture is used to adjust the recording direction. Therecording method provided in this embodiment of the present disclosuremay be applied to a mobile terminal having a touchscreen. Therefore, theuser may input the specified recording direction using the touchscreen.

Further, in this embodiment of the present disclosure, a sound sourcedirection mark may be displayed on a touchscreen display interface. Thesound source direction mark is used to mark a sound source direction.For example, in this embodiment of the present disclosure, the soundsource direction mark may be a pointer. The user adjusts the soundsource direction mark to adjust the recording direction. Therefore, therecording apparatus may obtain, in the following manner, the recordingdirection that is set by the user, obtaining the sound source adjustmentgesture input by the user. For example, the sound source adjustmentgesture may be input using a gesture of touching and tapping, sliding,or the like by a finger on the touchscreen display interface, or may beinput using an air gesture or the like. This is not limited in thisembodiment of the present disclosure. In this embodiment of the presentdisclosure, if the user inputs the sound source adjustment gesture, therecording apparatus may determine, according to the sound sourceadjustment gesture, a display location of an adjusted sound sourcedirection mark on the touchscreen display interface, and determine thata sound source direction indicated by the display location of theadjusted sound source direction mark on the touchscreen displayinterface is the recording direction that is set by the user.

During specific implementation, in this embodiment of the presentdisclosure, a pointer used to identify a sound source direction may beset and displayed on a display interface of the mobile terminal in arecording process in order to indicate a sound source direction. Theuser may adjust, on the touchscreen, the pointer used to identify asound source direction. The recording apparatus obtains an adjustmenttrack of the adjustment, by the user on the touchscreen, of the pointerused to identify a sound source direction, and determines that alocation indicated by an end point of the adjustment track is therecording direction. For example, in a conference room, after the userstarts a sound recorder application in the mobile terminal, a pointerused to identify a sound source direction may be displayed on a displayinterface that displays a sound recorder, and the pointer points to adirection in which a person makes a speech. Discussion is heated andmany people speak in the conference, but the user may focus on only akey role that makes a speech. Therefore, a pointing direction of thepointer may be adjusted to a sound source direction in which the keyrole makes a speech, and the direction is set to the recordingdirection. The recording apparatus obtains the specified recordingdirection and saves the recording direction in the recording file suchthat when the recording file is played, playing can be performedaccording to the saved recording direction.

Further, in this embodiment of the present disclosure, the user mayseparately set different recording directions at different time, thatis, the recording direction that is set by the user includes at leasttwo different recording directions that are separately set by the userat different time such that the recording direction can be adjusted atany time according to the recording direction specified by the user inthe recording process, and recording in a corresponding sound sourcedirection can be implemented. For example, in a conference discussionprocess, the user may focus on speeches of different roles at differenttime, for example, focuses on a speech of a role A at time TA andfocuses on a speech of a role B at time TB. Therefore, the user may set,at the time TA, the recording direction to a sound source direction inwhich the role A is located, input a sound source adjustment gesture atthe time TB, and adjust the recording direction to a sound sourcedirection in which the role B is located. The recording apparatusemphatically records, at the time TA, a sound in the sound sourcedirection in which the role A is located, switches the recordingdirection after obtaining the sound source adjustment gesture of theuser for adjusting the recording direction to the sound source directionin which the role B is located, and emphatically records, at the timeTB, a sound in the sound source direction in which the role B islocated.

A method implementation process in which a recording play apparatusplays recording based on a recording file obtained using the recordingplay method provided in the foregoing embodiment is described in detailin an embodiment of the present disclosure below. FIG. 4 is animplementation flowchart of a recording play method provided in thisembodiment of the present disclosure. As shown in FIG. 4, the methodincludes the following steps.

Step S301. Obtain a recording file.

In this embodiment of the present disclosure, the recording fileobtained by the recording play apparatus saves recording data in allsound source directions input by at least three microphones.

Step S302. Determine a recording play direction.

In this embodiment of the present disclosure, the recording playdirection may be understood as a sound source direction specified by auser, and the specified sound source direction is at least one soundsource direction of all the sound source directions input by the atleast three microphones.

In this embodiment of the present disclosure, the user may adjust therecording play direction by inputting a play direction adjustmentgesture, for example, set the recording play direction by inputting theplay direction adjustment gesture on a touchscreen display interface.

In this embodiment of the present disclosure, a sound source directionmark may be displayed on the touchscreen display interface, and the useradjusts the sound source direction mark by inputting the play directionadjustment gesture in order to adjust the recording play direction. Therecording play apparatus obtains a display location of an adjusted soundsource direction mark on the touchscreen display interface, anddetermines that a sound source direction indicated by the displaylocation of the adjusted sound source direction mark on the touchscreendisplay interface is the recording play direction that is set by theuser. For example, in this embodiment of the present disclosure, theuser may set the recording play direction by adjusting a pointer used toidentify a sound source direction, and the recording play apparatus maydetermine the recording play direction by obtaining a direction to whichthe pointer points.

Step S303. The recording play apparatus determines, in the recordingfile according to the determined recording play direction, recordingdata that matches the recording play direction.

Step S304. Play the determined recording data.

In this embodiment of the present disclosure, the recording playapparatus may perform, according to the determined recording playdirection and the determined recording data, noise reduction processingon an audio output signal corresponding to the recording data in therecording play direction in order to improve a signal-to-noise ratio ofthe audio output signal corresponding to the recording data in therecording play direction, and play recording corresponding to therecording data in the recording play direction.

The recording play direction may be set and adjusted by the user.Therefore, in the present disclosure, a direction-adjustable recordingplay function can be implemented. For example, the recording playdirection includes a first recording play direction and a secondrecording play direction, and the first recording play direction and thesecond recording play direction are different recording play directionsthat are set by the user at different time points. For example, the usersets the first recording play direction at a time point T1, and inputsthe play direction adjustment gesture at a time point T2. The playdirection adjustment gesture is used to adjust the recording playdirection. The recording play apparatus may play the determinedrecording data in the following manner of playing first recording data,where the first recording data is recording data that is determined inthe recording file and that matches the first recording play direction,obtaining the play direction adjustment gesture input by the user, wherethe play direction adjustment gesture is used to adjust the recordingplay direction, and switching, according to the play directionadjustment gesture, from playing the first recording data to playingsecond recording data, where the second recording data is recording datathat is determined in the recording file and that matches the secondrecording play direction.

Optionally, if the recording file saves a recording direction, therecording play direction may be determined according to a process of amethod shown in FIG. 5. As shown in FIG. 5, the method includes thefollowing steps.

Step S3011. Determine whether a user sets a specified play direction.

In this embodiment of the present disclosure, the specified playdirection is determined according to the play direction adjustmentgesture input by the user, and the play direction adjustment gesture isused to adjust the recording play direction. For example, whether theuser inputs the sound source adjustment gesture on the touchscreendisplay interface may be determined. If the user inputs the sound sourceadjustment gesture on the touchscreen display interface, it isdetermined that the user sets the specified play direction, or if theuser does not input the sound source adjustment gesture on thetouchscreen display interface, it is determined that the user does notset the specified play direction.

Further, in this embodiment of the present disclosure, in a process inwhich the recording play apparatus or a mobile terminal having arecording play function plays the recording file, a pointer used toidentify a sound source direction may be displayed on the displayinterface. Therefore, whether the user sets the specified play directionmay be determined by determining whether the user adjusts the pointerused to identify a sound source direction. If the user adjusts thepointer for identifying a sound source direction, it is determined thatthe user sets the specified play direction, or if the user does notadjust the pointer for identifying a sound source direction, it isdetermined that the user does not set the specified play direction.

In this embodiment of the present disclosure, if the user sets thespecified play direction, step S3012 is performed, or if the user doesnot set the specified play direction, step S3013 is performed.

Step S3012. If the user sets the specified play direction, set thespecified play direction as the recording play direction.

Step S3013. If the user does not set the specified play direction, setthe recording direction as the recording play direction.

In this embodiment of the present disclosure, if the recording filesaves the recording direction, the recording play apparatus may use thesaved recording direction as a default recording play direction, andplays recording according to the default recording play direction if theuser does not specify the play direction, or plays recording accordingto the play direction specified by the user if the user specifies theplay direction.

On the basis of the recording method provided in the foregoingembodiments, an embodiment of the present disclosure provides arecording apparatus. FIG. 6 is a schematic diagram of composition of arecording apparatus 100 provided in this embodiment of the presentdisclosure. As shown in FIG. 6, the recording apparatus 100 includes anobtaining unit 101 and a processing unit 102.

The obtaining unit 101 is configured to obtain recording data in allsound source directions input by at least three microphones.

The processing unit 102 is configured to generate a recording fileaccording to the recording data obtained by the obtaining unit 101,where the recording file saves the recording data in all the soundsource directions input by the at least three microphones.

In this embodiment of the present disclosure, the recording apparatus100 saves, in the recording file, all the recording data in all thesound source directions input by the at least three microphones suchthat the complete recording data is retained. When recording is playedsubsequently, recording data in a corresponding sound source directioncan be played according to the sound source direction that is set by auser. The sound source direction of the played recording data isdifferent when the direction that is set by the user is different suchthat a recording play direction can be adjusted.

In this embodiment of the present disclosure, the obtaining unit 101 isfurther configured to obtain a recording direction that is set by theuser, where the recording direction is one of at least two sound sourcedirections, and the at least two sound source directions are obtained bythe at least three microphones at a same time point.

The processing unit 102 is further configured to save, in the recordingfile, the recording direction obtained by the obtaining unit 101 suchthat playing is performed according to the saved recording direction ina recording play process.

Optionally, the recording direction that is set by the user and that isobtained by the obtaining unit 101 is determined according to a soundsource adjustment gesture input by the user, and the sound sourceadjustment gesture is used to adjust the recording direction.

Optionally, the recording direction that is set by the user and that isobtained by the obtaining unit 101 includes at least two differentrecording directions that are separately set by the user at differenttime such that the recording apparatus 100 can adjust the recordingdirection.

The recording apparatus 100 provided in this embodiment of the presentdisclosure may be configured to implement the recording method in theforegoing embodiment and has all functions for implementing a recordingprocess in the foregoing embodiment. For a specific implementationprocess, refer to related descriptions in the foregoing embodiment andthe accompanying drawing, and details are not described herein again.

An embodiment of the present disclosure further provides a terminal.FIG. 7A is a schematic diagram of composition of the terminal 1000provided in this embodiment of the present disclosure. As shown in FIG.7A, the terminal 1000 includes at least three microphones 1001, aprocessor 1002, a memory 1003, and a bus 1004. The at least threemicrophones 1001 and the memory 1003 are all connected to the processor1002 using the bus 1004.

The memory 1003 is configured to store program code executed by theprocessor 1002.

The at least three microphones 1001 are configured to input recordingdata in all sound source directions.

The processor 1002 is configured to obtain the recording data in all thesound source directions input by the at least three microphones 1001,and generate a recording file according to the obtained recording data,where the recording file saves the recording data in all the soundsource directions.

The terminal 1000 further includes an input device. As shown in FIG. 7B,an input device 1005 is connected to the processor 1002 using the bus1004.

The input device 1005 is configured to obtain a recording direction thatis set by a user, where the recording direction is one of at least twosound source directions, and the at least two sound source directionsare obtained by the at least three microphones 1001 at a same timepoint.

The processor 1002 is further configured to save, in the recording file,the recording direction obtained by the input device 1005.

Optionally, the recording direction that is set by the user and that isobtained by the input device 1005 is determined according to a soundsource adjustment gesture input by the user, and the sound sourceadjustment gesture is used to adjust the recording direction.

Optionally, the recording direction that is set by the user and that isobtained by the input device 1005 includes at least two differentrecording directions that are separately set by the user at differenttime.

It should be noted that in this embodiment of the present disclosure,the input device 1005 may be a touchscreen or the like.

The bus 1004 may include a channel for conveying information betweencomponents of a computer.

The processor 1002 may be a general-purpose central processing unit(CPU), a microprocessor, an application-specific integrated circuit(ASIC), or one or more integrated circuits used to control programexecution of the solution in the present disclosure. One or morememories included in a computer system may be a read-only memory (ROM)or a static storage device of another type that is capable of storingstatic information and a static instruction, a random access memory(RAM) or a dynamic storage device of another type that is capable ofstoring information and an instruction, or may be a magnetic diskmemory. These memories are connected to the processor 1002 using the bus1004.

The memory 1003, such as a RAM, stores an operating system and a programthat is used to execute the solution in the present disclosure. Theoperating system is a program that is used to control running of anotherprogram and manage a system resource.

A program stored in the memory 1003 is used to instruct the processor1002 to execute the recording method in the embodiments of the presentdisclosure.

It may be understood that the terminal 1000 in this embodiment may beconfigured to implement all functions in the foregoing embodimentrelated to the recording method. For a specific implementation process,refer to related descriptions in the foregoing method embodiment, anddetails are not described herein again.

An embodiment of the present disclosure further provides a computerstorage medium that is configured to store computer softwareinstructions used by the recording apparatus 100 and the terminal 1000,and the computer software instructions include the programs that areused to execute the foregoing method embodiments. A recording functioncan be implemented by executing the stored programs.

Based on the recording play method provided in the foregoing embodiment,an embodiment of the present disclosure provides a recording playapparatus 200. FIG. 8 is a schematic diagram of composition of therecording play apparatus 200 according to this embodiment of the presentdisclosure. As shown in FIG. 8, the recording play apparatus 200includes an obtaining unit 201, a processing unit 202, and a play unit203.

The obtaining unit 201 is configured to obtain a recording file anddetermine a recording play direction, where the recording file savesrecording data in all sound source directions input by at least threemicrophones, and the recording play direction is at least one of all thesound source directions.

The processing unit 202 is configured to determine, in the recordingfile obtained by the obtaining unit 201 and according to the recordingplay direction determined by the obtaining unit 201, recording data thatmatches the recording play direction.

The play unit 203 is configured to play the recording data determined bythe processing unit 202.

The recording play apparatus 200 provided in this embodiment of thepresent disclosure can implement directional recording play. It may beunderstood that the recording play direction determined by the recordingplay apparatus 200 may be any one or more of all the sound sourcedirections. Therefore, the recording play apparatus 200 provided in thisembodiment of the present disclosure can implement a recording playfunction in which a sound source direction is adjustable.

Optionally, the recording file obtained by the obtaining unit 201 savesa recording direction, the recording direction is one of at least twosound source directions, and the at least two sound source directionsare obtained by the at least three microphones at a same time point.

The obtaining unit 201 determines the recording play direction in thefollowing manner, including determining that the recording playdirection is the specified play direction if a user sets a specifiedplay direction, or determining that the recording play direction is therecording direction if a user does not set a specified play direction.

Optionally, the specified play direction is determined according to aplay direction adjustment gesture input by the user, and the playdirection adjustment gesture is used to adjust the recording playdirection.

Optionally, the recording play direction obtained by the obtaining unit201 includes a first recording play direction and a second recordingplay direction, and the first recording play direction and the secondrecording play direction are different recording play directions thatare set by the user at different time points.

The processing unit 202 is configured to determine, in the recordingfile, recording data that matches the first recording play direction andrecording data that matches the second recording play direction.

The obtaining unit 201 is configured to obtain the play directionadjustment gesture input by the user, where the play directionadjustment gesture is used to adjust the recording play direction.

The play unit 203 plays the determined recording data in the followingmanner, including playing first recording data, where the firstrecording data is the recording data that is determined by theprocessing unit 202 in the recording file and that matches the firstrecording play direction, and switching, according to the play directionadjustment gesture obtained by the obtaining unit 201, from playing thefirst recording data to playing second recording data, where the secondrecording data is the recording data that is determined by theprocessing unit 202 in the recording file and that matches the secondrecording play direction. Using this design, a recording play functionin which a recording play direction can be switched and adjusted can beimplemented.

The recording play apparatus 200 provided in this embodiment of thepresent disclosure may be configured to implement the recording playmethod in the foregoing embodiment and has all functions forimplementing a recording play process in the foregoing embodiment. For aspecific implementation process, refer to related descriptions in theforegoing embodiment and the accompanying drawing, and details are notdescribed herein again.

An embodiment of the present disclosure further provides a terminal2000. FIG. 9A is a schematic diagram of composition of the terminal 2000according to this embodiment of the present disclosure. As shown in FIG.9A, the terminal 2000 provided in this embodiment of the presentdisclosure includes a player 2001, a processor 2002, a memory 2003, anda bus 2004. Both the player 2001 and the memory 2003 are connected tothe processor 2002 using the bus 2004.

The memory 2003 is configured to store program code executed by theprocessor 2002.

The processor 2002 is configured to obtain a recording file, determine arecording play direction, and determine, in the obtained recording fileaccording to the determined recording play direction, recording datathat matches the recording play direction, where the recording filesaves recording data in all sound source directions input by at leastthree microphones, and the recording play direction is at least one ofall the sound source directions input by the at least three microphones.

The player 2001 is configured to play the recording data determined bythe processor 2002.

Optionally, the recording file obtained by the processor 2002 saves arecording direction, the recording direction is one of at least twosound source directions, and the at least two sound source directionsare obtained by the at least three microphones at a same time point.

The terminal 2000 further includes an input device. As shown in FIG. 9B,the input device 2005 is configured to obtain a specified play directionthat is set by a user.

The processor 2002 determines the recording play direction in thefollowing manner, including if the input device 2005 obtains thespecified play direction that is set by the user, the processor 2002uses the specified play direction as the recording play direction, or ifthe input device 2005 does not obtain the specified play direction thatis set by the user, the processor 2002 uses the recording direction asthe recording play direction.

Further, the input device 2005 may be configured to obtain, in thefollowing manner, the specified play direction that is set by the user,including obtaining, by the input device 2005, a play directionadjustment gesture input by the user, where the play directionadjustment gesture is used to adjust the recording play direction, anddetermining the specified play direction according to the play directionadjustment gesture input by the user.

Optionally, the recording play direction obtained by the processor 2002includes a first recording play direction and a second recording playdirection, and the first recording play direction and the secondrecording play direction are different recording play directions thatare set by the user at different time points. The processor 2002 isconfigured to determine, in the recording file, recording data thatmatches the first recording play direction and recording data thatmatches the second recording play direction.

The terminal 2000 includes an input device 2005, where the input device2005 is configured to obtain a play direction adjustment gesture that isinput by the user and that is used to adjust the first recording playdirection.

The player 2001 plays the determined recording data in the followingmanner, including playing first recording data, where the firstrecording data is the recording data that is determined by the processor2002 in the recording file and that matches the first recording playdirection, and switching, according to the play direction adjustmentgesture that is obtained by the input device 2005 and that is used toadjust the first recording play direction, from playing the firstrecording data to playing second recording data, where the secondrecording data is the recording data that is determined by the processor2002 in the recording file and that matches the second recording playdirection.

It should be noted that in this embodiment of the present disclosure,the input device 2005 may be a touchscreen or the like.

The player 2001 may be a headset interface, a speaker, or the like, andis configured to play the recording data.

The bus 2004 may include a channel for conveying information betweencomponents of a computer.

The processor 2002 may be a general-purpose CPU, a microprocessor, anASIC, or one or more integrated circuits used to control programexecution of the solution in the present disclosure. One or morememories included in a computer system may be a ROM or a static storagedevice of another type that is capable of storing static information anda static instruction, a RAM or a dynamic storage device of another typethat is capable of storing information and an instruction, or may be amagnetic disk memory. These memories are connected to the processorusing the bus.

The memory 2003, such as a RAM, stores an operating system and a programthat is used to execute the solution in the present disclosure. Theoperating system is a program that is used to control running of anotherprogram and manage a system resource.

A program stored in the memory 2003 is used to instruct the processor2002 to execute the recording play method in the embodiments of thepresent disclosure.

It may be understood that the terminal 2000 in this embodiment may beconfigured to implement all functions in the foregoing embodimentrelated to the recording play method. For a specific implementationprocess, refer to related descriptions in the foregoing methodembodiment, and details are not described herein again.

An embodiment of the present disclosure further provides a computerstorage medium that is configured to store a computer softwareinstruction used by the recording play apparatus 200 or the terminal2000, and the computer software instruction includes the program that isused to execute the foregoing method embodiment. A recording playfunction can be implemented by executing the stored program.

Although the present disclosure is described with reference to theembodiments, in a process of implementing the present disclosure thatclaims protection, a person skilled in the art may understand andimplement another variation of the disclosed embodiments by viewing theaccompanying drawings, disclosed content, and the accompanying claims.In the claims, “comprising” does not exclude another component oranother step, and “a” or “one” does not exclude a case of multiple. Asingle processor or another unit may implement several functionsenumerated in the claims. Some measures are recorded in dependent claimsthat are different from each other, but this does not mean that thesemeasures cannot be combined to produce a better effect.

A person skilled in the art should understand that the embodiments ofthe present disclosure may be provided as a method, an apparatus(device), or a computer program product. Therefore, the presentdisclosure may use a form of hardware only embodiments, software onlyembodiments, or embodiments with a combination of software and hardware.Moreover, the present disclosure may use a form of a computer programproduct that is implemented on one or more computer-usable storage media(including but not limited to a disk memory, a compact disc ROM(CD-ROM), an optical memory, and the like) that include computer-usableprogram code. The computer program is stored/distributed in a propermedium and is provided as or used as a part of the hardware togetherwith another hardware, or may also use another allocation form, such asusing the Internet or another wired or wireless telecommunicationssystem.

The present disclosure is described with reference to the flowchartsand/or block diagrams of the method, the apparatus (device), and thecomputer program product according to the embodiments of the presentdisclosure. It should be understood that computer program instructionsmay be used to implement each process and/or each block in theflowcharts and/or the block diagrams and a combination of a processand/or a block in the flowcharts and/or the block diagrams. Thesecomputer program instructions may be provided for a general-purposecomputer, a dedicated computer, an embedded processor, or a processor ofany other programmable data processing device to generate a machine suchthat the instructions executed by a computer or a processor of any otherprogrammable data processing device generate an apparatus forimplementing a specific function in one or more processes in theflowcharts and/or in one or more blocks in the block diagrams.

These computer program instructions may also be stored in a computerreadable memory that can instruct the computer or any other programmabledata processing device to work in a specific manner such that theinstructions stored in the computer readable memory generate an artifactthat includes an instruction apparatus. The instruction apparatusimplements a specific function in one or more processes in theflowcharts and/or in one or more blocks in the block diagrams.

These computer program instructions may also be loaded onto a computeror another programmable data processing device such that a series ofoperations and steps are performed on the computer or the anotherprogrammable device, thereby generating computer-implemented processing.Therefore, the instructions executed on the computer or the anotherprogrammable device provide steps for implementing a specific functionin one or more processes in the flowcharts and/or in one or more blocksin the block diagrams.

Although the present disclosure is described with reference to specificfeatures and the embodiments thereof, obviously, various modificationsand combinations may be made to them without departing from the spiritand scope of the present disclosure. Correspondingly, the specificationand accompanying drawings are merely example description of the presentdisclosure defined by the accompanying claims, and is considered as anyof or all modifications, variations, combinations or equivalents thatcover the scope of the present disclosure.

Obviously, a person skilled in the art can make various modificationsand variations to the present disclosure without departing from thespirit and scope of the present disclosure. The present disclosure isintended to cover these modifications and variations provided that theyfall within the scope of protection defined by the following claims andtheir equivalent technologies.

What is claimed is:
 1. A terminal, comprising: a screen; a microphonearray; a processor; and a memory coupled to the processor and storinginstructions that, when executed by the processor, cause the terminalto: obtain a recording file, wherein the recording file comprises savedrecording data input from all sound source directions by the microphonearray; receive a first gesture on an interface on the screen, whereinthe first gesture indicates a first recording play direction; determine,according to the first gesture, first recording data matching the firstrecording play direction from the recording file; and play the firstrecording data.
 2. The terminal of claim 1, wherein the instructions,when executed by the processor, further cause the terminal to: receive asecond gesture on the interface, wherein the second gesture indicates asecond recording play direction; determine, according to the secondgesture, second recording data matching the second recording playdirection from the recording file; and play the second recording data.3. The terminal of claim 1, wherein the interface comprises a firstidentifier associated with a first sound source direction, and whereinthe first recording play direction is indicated by the first gesture onthe first identifier.
 4. The terminal of claim 2, wherein the interfacefurther comprises a second identifier associated with a second soundsource direction, and wherein the second recording play direction isindicated by the second gesture on the second identifier.
 5. Theterminal of claim 2, wherein the first recording play direction and thesecond recording play direction comprise different recording playdirections at different time points.
 6. The terminal of claim 2, whereinthe first sound source direction and the second sound source directionare obtained by the microphone array at a same time point
 7. Theterminal of claim 1, wherein the instructions further cause the terminalto: process the first recording data as a stereophonic file thatsupports binaural playing with both an audio-left channel and anaudio-right channel; and play the stereophonic file in a form of oneaudio output.
 8. The terminal of claim 1, wherein before the firstgesture is received, the instructions further cause the terminal to playthe recording file according to a default recording play direction.
 9. Amethod for a terminal comprising a screen and a microphone array, themethod comprising: obtaining a recording file, wherein the recordingfile comprises saved recording data input from all sound sourcedirections by the microphone array; receiving a first gesture on aninterface displayed on the screen, wherein the first gesture indicates afirst recording play direction; determining, according to the firstgesture, first recording data matching the first recording playdirection from the recording file; and playing the first recording data.10. The method of claim 9 further comprising: receiving a second gestureon the interface, wherein the second gesture indicates a secondrecording play direction; determining, according to the second gesture,a second recording data matching the second recording play directionfrom the recording file; and playing the second recording data.
 11. Themethod of claim 9, wherein the interface comprises a first identifierassociated with a first sound source direction, and wherein the firstrecording play direction is indicated by the first gesture on the firstidentifier.
 12. The method of claim 10, wherein the interface furthercomprises a second identifier associated with a second sound sourcedirection, and wherein the second recording play direction is indicatedby the second gesture on the second identifier.
 13. The method of claim10, wherein the first sound source direction and the second sound sourcedirection are obtained by the microphone array at a same time point. 14.The method of claim 10, wherein the first recording play direction andthe second recording play direction comprise different recording playdirections at different time points.
 15. The method of claim 9, whereinplaying the first recording data matching the first recording playdirection further comprises: processing the first recording data as astereophonic file that supports binaural playing with both an audio-leftchannel and an audio-right channel; and playing the stereophonic file inone audio output.
 16. The method of claim 9, wherein before the firstgesture is received, further comprising playing the recording fileaccording to a default recording play direction.
 17. A computer programproduct comprising computer-executable instructions for storage on anon-transitory computer-readable storage medium that, when executed by aprocessor, cause an apparatus to: obtain a recording file, wherein therecording file comprises saved recording data input from all soundsource directions by a microphone array; receive a first gesture on aninterface displayed on a screen, wherein the first gesture indicates afirst recording play direction; determine, according to the firstgesture, a first recording data matching the first recording playdirection from the recording file; and play the first recording data.18. The computer program product of claim 17, further comprisinginstructions for: receiving a second gesture on the interface, whereinthe second gesture indicates a second recording play direction;determining, according to the second gesture, a second recording datamatching the second recording play direction from the recording file;and playing the second recording data.
 19. The computer program productof claim 17, wherein the interface comprises a first identifierassociated with a first sound source direction, and wherein the firstrecording play direction is indicated by the first gesture on the firstidentifier.
 20. The computer program product of claim 18, wherein theinterface further comprises a second identifier associated with a secondsound source direction, and wherein the second recording play directionis indicated by the second gesture on the second identifier.